//*********************************************************************
//  Dictionary2.java  Java  Foundations
//
//  Represents a dictionary, which is abook. Used to demonstrete
//  the use of the super reference.
//*********************************************************************

public class Dictionary2 extends Book2
{
   private int definitions;

   //------------------------------------------------------------------------
   //  Constructor: Sets up the dictionary with the specific number
   //  of pages and definitions.
   //------------------------------------------------------------------------
   public Dictionary2 (int numPages, int numDefinitions)
   {
      super(numPages);

      definitions = numDefinitions;
    }
   //-------------------------------------------------------------------------
   //  Prints a message using both local and inherited values.
   //-------------------------------------------------------------------------
   public double computeRatio ()
   {
     return definitions/pages;
   }

   //---------------------------------------------------------------------
   //  Definitions mutator.
   //---------------------------------------------------------------------
   public void setefinitions (int numDefinitions)
   {
      definitions = numDefinitions;
    }
   //-------------------------------------------------------------------
   //  Definitions accessor.
   //-------------------------------------------------------------------
   public int getDefinitions ()
   {
     return definitions;
   }
}

